package org.jeecg.modules.common.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.ToString;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * @Classname FluxStatisticalPower
 * @Description TODO
 * @Date 2023/6/28 15:55
 * @Created by 10835
 */
@Data
@ToString
public class FluxStatisticalPower {
    @Data
    public static class Power{
        private LocalDate date;
        private Double value;
        public Power(LocalDate date,Double value){
            this.date = date;
            this.value = value;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Power)) return false;
            Power power = (Power) o;
            return getDate().equals(power.getDate());
        }

        @Override
        public int hashCode() {
            return Objects.hash(getDate());
        }
    }


    private List<Power> powerList;

    public FluxStatisticalPower(){
        powerList = new ArrayList<>();

    }
}
